#!/usr/bin/env python3
# coding:utf-8
import sys
from loguru import logger

logger.debug("this test")
logger.add(sys.stdout,format="[{time} {level}] {message}")
logger.debug("this test 10")

logger.remove(handler_id=None)
logger.add(sys.stderr,format="[{time} {level}] {message}")
logger.debug("this test 11 ")

logger.remove(handler_id=None)
log_format="[{time:YYYYMMDD-HH:mm:ss.SSS} {level}] {message}"
logger.add(sys.stderr,format=log_format)
logger.debug("this test 12")

# 2023-12-26 16:21:36.204 | DEBUG    | __main__:<module>:6 - this test
# [2023-12-26T16:21:36.205378+0800 DEBUG] this test
# [20231226-16:21:36.206 DEBUG] this test